home *** CD-ROM | disk | FTP | other *** search
/ PC Electronics Plus 3 / PC Electronics Plus 3.iso / astater / astater.doc next >
Text File  |  1994-09-01  |  45KB  |  1,424 lines

  1. page 1
  2.           ┌────────────────────────────────────────────────────────┐
  3.           │ ASTATER.EXE Version 1.0 - AHDL State Machine Generator │
  4.           └────────────────────────────────────────────────────────┘
  5.  
  6.            (C)Copyright & Support - Amos Zaslavsky @ 972-4-230219.
  7.  
  8.    Description ........................................................  1
  9.    Command line syntax ................................................  2
  10.    Example 1 : A Mealy machine with fully encoded state assignment ....  3
  11.    Example 2 : A Mealy machine with One-Hot state assignment .......... 11
  12.    Example 3 : A Moore machine with direct outputs .................... 15
  13.    Example 4 : A Moore mixed example .................................. 21
  14.    Errors, Warning & Note Messages .................................... 28
  15.    Limitations & Legal details ........................................ 32
  16.  
  17.                                  Description
  18.                                 -------------
  19.  
  20. ASTATER.EXE is a utility for generating an ABEL file for state machines.
  21.  
  22. It will generate a file template that will fit your requirements of:
  23.  
  24. - number of inputs
  25. - number of outputs
  26. - maximum number of relevant conditions per state
  27. - number of flip flops
  28. - state names
  29.  
  30. After generation of the state machine file you will have to make a few
  31. changes to the file with your text editor. This utility can save time and let
  32. you concentrate on the logic of the machine an not on the syntax. The program
  33. is simpler to use then some fancy graphical state machine generators that
  34. are on the market (which are also expensive).
  35.  
  36. The original idea of a stater program came from Ofer Hoffman (A VHDL shark
  37. @ 972-4-230048) how wrote a program like this for VHDL users !
  38.  
  39.  page 2
  40.                              Command line syntax
  41.                             ---------------------
  42.  
  43. ASTATER must be followed by eight command line parameters:
  44.  
  45.  ASTATER <module> <in> <out> <con> <ff> /1|2 <state_name> <state_name>...
  46.  
  47.   <module>  Is the module name. This will also be the file name and device
  48.             name.
  49.  
  50.   <in>      Is the number of inputs. At least one input must be defined.
  51.  
  52.   <out>     Number of indirect outputs. Indirect output is an output that is
  53.             not a direct flip flop output.
  54.  
  55.   <cond>    Is the maximum number of relevant condition per state. A machine
  56.             can have many inputs (for example 15: I1,I2...I15), but in each
  57.             state only a small number of conditions is relevant. for example:
  58.  
  59.             condition1 -   I1 & !I2
  60.             condition2 -   I1 &  I2
  61.             condition3 -  !I1
  62.  
  63.             (in this example only 3 conditions). The maximum number of
  64.             conditions is 2^(inputs). A condition is not only a single input
  65.             signal (literal) but a can be a function of such signals (Like in
  66.             the previous example).
  67.  
  68.   <ff>      Number of flip-flops. A state machine must have at least one
  69.             flip-flop. If it has no flip-flops it is not a synchronous state
  70.             machine. If you plan to use one of the Flip-Flop outputs as an
  71.             output of the machine (a good way to prevent output spikes), don't
  72.             count it as an output of the machine. Such an output is called in
  73.             this document - "A direct output". Only indirect outputs should be
  74.             counted as outputs of the machine.
  75.  
  76.   /1|2      Type of machine:
  77.  
  78.             /1 - Moore machine (outputs depend only of the present state of
  79.                                 the machine)
  80.             /2 - Mealy machine (outputs depend both on the present state of
  81.                                 the machine and the inputs)
  82.             /3 - Dummy machine (A moore machine that can be compiled with on
  83.                                 modifications. The machine is a cyclic counter
  84.                                 enabled by the "input1" signal. The number of
  85.                                 conditions that you enter as command line is
  86.                                 not relevant.)
  87.  
  88.   <state>   A state name. A list of state names must have at least tow
  89.             members, but can have more.
  90.  
  91.  page 3
  92.  
  93.        Example 1 : A Mealy machine with fully encoded state assignment
  94.        ---------------------------------------------------------------
  95.  
  96. In this example we will describe a Mealy state machine with 3 inputs and 3
  97. outputs.
  98.  
  99.                                  ┌─────────┐
  100.                            U ───>┤         ├──>─ R
  101.                 Inputs     V ───>┤    M1   ├──>─ S     Outputs
  102.                            W ───>┤         ├──>─ T
  103.                                  └────┬────┘
  104.                                       │
  105.                               Cp ──>──┘
  106.  
  107.  
  108. This is a state-table of the machine:
  109.  
  110.             ┌───────────────┬─────────┬┬───────────────┬─────────┐
  111.             │ Present State │  Input  ││  Next State   │ Output  │
  112.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  113.             │       AA      │   !U    ││      AA       │    R    │
  114.             │               │    U    ││      BB       │    R    │
  115.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  116.             │       BB      │   !V    ││      CC       │   S,T   │
  117.             │               │    V    ││      DD       │   S     │
  118.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  119.             │       CC      │ !V & W  ││      CC       │    -    │
  120.             │               │  V & W  ││      DD       │    -    │
  121.             │               │     !W  ││      AA       │    -    │
  122.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  123.             │       DD      │    1    ││      AA       │   R,S   │
  124.             └───────────────┴─────────┴┴───────────────┴─────────┘
  125.  
  126.  
  127. It is easy to see from the table that the maximum number of transition
  128. conditions per state is three. The behavior of this machine is a Mealy
  129. behavior only when the machine is in state BB (and it's enough to make it a
  130. Mealy machine). When the machine is in state DD it makes an un-conditional
  131. transition (Autonomous) to the AA state.
  132.  
  133. In This example we will use a full binary encoding of state assignments. For
  134. this kind of encoding we need only tow flip-flops. In the next example we will
  135. use a One-Hot decoded state assignments. In the next example four flip-flops
  136. will be needed.
  137.  
  138.  page 4
  139.  
  140. For this example ASTATER.EXE will be used with The following command line
  141. parameters:
  142.  
  143.                3 - inputs
  144.                3 - outputs
  145.                3 - conditions
  146.                2 - flip-flops
  147.               /2 - Mealy machine
  148.               AA - first state
  149.               BB - second state
  150.               CC - third state
  151.               DD - forth state
  152.  
  153. Here is the command line you have to type:
  154.  
  155. ASTATER M1 3 3 3 2 /2 AA BB CC DD
  156.  
  157. Here is the file that will be created by ASTATER.EXE :
  158.  
  159.  
  160.                                     M1.ABL
  161. ┌─
  162. │MODULE M1
  163. │TITLE 'M1.ABL created by ASTATER.EXE Version 1.0
  164. │       Time of creation is Sat Aug 20 17:07:13 1994
  165. │      '
  166. │DECLARATIONS
  167. │   M1 DEVICE ;
  168. │   input1 PIN ;
  169. │   input2 PIN ;
  170. │   input3 PIN ;
  171. │   CP PIN ; "CLOCK INPUT"
  172. │   MR PIN ; "MASTER RESET (ASYN) INPUT"
  173. │   output1 PIN ISTYPE 'COM' ;
  174. │   output2 PIN ISTYPE 'COM' ;
  175. │   output3 PIN ISTYPE 'COM' ;
  176. │   Q1 NODE ISTYPE 'REG,BUFFER' ;
  177. │   Q0 NODE ISTYPE 'REG,BUFFER' ;
  178. │   PS = [Q1,Q0] ; "STATE ASSIGNMENT"
  179. │   AA = [ 0, 0] ;
  180. │   BB = [ 0, 0] ;
  181. │   CC = [ 0, 0] ;
  182. │   DD = [ 0, 0] ;
  183. │   C , X , P , Z = .C. , .X. , .P. , .Z. ;
  184. │  page 5
  185.  
  186. │EQUATIONS
  187. │PS.AR = !MR ;
  188. │   PS.CLK = CP ;
  189. │STATE_DIAGRAM PS
  190. │   STATE AA :
  191. │      [output1,output2,output3]=[0,0,0] ;
  192. │      CASE
  193. │         condition11 : next_state11
  194. │            WITH
  195. │               [output1,output2,output3]=[0,0,0] ;
  196. │            ENDWITH ;
  197. │         condition12 : next_state12
  198. │            WITH
  199. │               [output1,output2,output3]=[0,0,0] ;
  200. │            ENDWITH ;
  201. │         condition13 : next_state13
  202. │            WITH
  203. │               [output1,output2,output3]=[0,0,0] ;
  204. │            ENDWITH ;
  205. │      ENDCASE ;
  206. │   STATE BB :
  207. │      [output1,output2,output3]=[0,0,0] ;
  208. │      CASE
  209. │         condition21 : next_state21
  210. │            WITH
  211. │               [output1,output2,output3]=[0,0,0] ;
  212. │            ENDWITH ;
  213. │         condition22 : next_state22
  214. │            WITH
  215. │               [output1,output2,output3]=[0,0,0] ;
  216. │            ENDWITH ;
  217. │         condition23 : next_state23
  218. │            WITH
  219. │               [output1,output2,output3]=[0,0,0] ;
  220. │            ENDWITH ;
  221. │      ENDCASE ;
  222. │   STATE CC :
  223.  pgage 6
  224.  
  225. │      [output1,output2,output3]=[0,0,0] ;
  226. │      CASE
  227. │         condition31 : next_state31
  228. │            WITH
  229. │               [output1,output2,output3]=[0,0,0] ;
  230. │            ENDWITH ;
  231. │         condition32 : next_state32
  232. │            WITH
  233. │               [output1,output2,output3]=[0,0,0] ;
  234. │            ENDWITH ;
  235. │         condition33 : next_state33
  236. │            WITH
  237. │               [output1,output2,output3]=[0,0,0] ;
  238. │            ENDWITH ;
  239. │      ENDCASE ;
  240. │   STATE DD :
  241. │      [output1,output2,output3]=[0,0,0] ;
  242. │      CASE
  243. │         condition41 : next_state41
  244. │            WITH
  245. │               [output1,output2,output3]=[0,0,0] ;
  246. │            ENDWITH ;
  247. │         condition42 : next_state42
  248. │            WITH
  249. │               [output1,output2,output3]=[0,0,0] ;
  250. │            ENDWITH ;
  251. │         condition43 : next_state43
  252. │            WITH
  253. │               [output1,output2,output3]=[0,0,0] ;
  254. │            ENDWITH ;
  255. │      ENDCASE ;
  256. │DECLARATIONS
  257. │   NS = [Q1,Q0] ; "NEXT STATE"
  258. │TEST_VECTORS
  259. │   ([MR,CP,input1,input2,input3] -> [NS,output1,output2,output3])
  260. │END
  261. └─
  262.  
  263. All the place holders were generated by ASTATER.EXE in lowercase letters.
  264. Using the replace function of your editor (a global replace) do the folowing
  265. replacements:
  266.  
  267.  page 7
  268.  
  269. - Replace input1 with U
  270.  
  271. - Replace input2 with V
  272.  
  273. - Replace input3 with W
  274.  
  275. - Replace output1 with R
  276.  
  277. - Replace output2 with S
  278.  
  279. - Replace output3 with T
  280.  
  281. Now do the folowing changes:
  282.  
  283. - Make state assignments.
  284.  
  285.   for example:
  286.  
  287.                 AA = [0,0], BB = [0,1], CC = [1,0], DD = [1,1]
  288.  
  289.   The assignment of combination [0,0] to state AA and the declarations of
  290.   attributes 'REG,BUFFER' that were chosen for Q1 and Q0, make the AA state
  291.   the reset state of the machine. It is not hard to change it.
  292.  
  293. - Delete the WITH..ENDWITH blocks from first, third and last state blocks.
  294.   These blocks desribe Mealy type behavior, and these blocks are Moore type
  295.   blocks (only the second block describes a Mealy behavior).
  296.  
  297. - Replace dummy conditions (condition1,condition2...) and next_states
  298.   (next_state1, next_state2...) , with real conditions and real next_states
  299.   and delete lines that are not needed.
  300.  
  301.   It is possible to describe an unconditional transition with ABEL's CASE
  302.   statements in the following way:
  303.  
  304.     STATE DD :
  305.        [R,S,T]=[1,1,0] ;
  306.        CASE
  307.           1 : AA                   <- this is the unconditional transition
  308.        ENDCASE ;
  309.  
  310.   it is equivalent to the folowing statements:
  311.  
  312.     STATE DD :
  313.        [R,S,T]=[1,1,0] ;
  314.        GOTO AA
  315.  page 8
  316.  
  317. - Replace zero output assignments (Mealy and Moore type) with real (0 or 1)
  318.   output assignments and delete output assignments that are not needed.
  319.  
  320. - Add test vector values.
  321.  
  322. Now the file will look like this:
  323.  
  324.                                     M1.ABL
  325. ┌─
  326. │MODULE M1
  327. │TITLE 'M1.ABL created by ASTATER.EXE Version 1.0
  328. │       Time of creation is Sat Aug 20 17:07:13 1994
  329. │      '
  330. │DECLARATIONS
  331. │   M1 DEVICE ;
  332. │   U PIN ;
  333. │   V PIN ;
  334. │   W PIN ;
  335. │   CP PIN ; "CLOCK INPUT"
  336. │   MR PIN ; "MASTER RESET (ASYN) INPUT"
  337. │   R PIN ISTYPE 'COM' ;
  338. │   S PIN ISTYPE 'COM' ;
  339. │   T PIN ISTYPE 'COM' ;
  340. │   Q1 NODE ISTYPE 'REG,BUFFER' ;
  341. │   Q0 NODE ISTYPE 'REG,BUFFER' ;
  342. │   PS = [Q1,Q0] ; "STATE ASSIGNMENT"
  343. │   AA = [ 0, 0] ;
  344. │   BB = [ 0, 1] ;
  345. │   CC = [ 1, 0] ;
  346. │   DD = [ 1, 1] ;
  347. │   C , X , P , Z = .C. , .X. , .P. , .Z. ;
  348. │EQUATIONS
  349. │   PS.AR = !MR ;
  350. │   PS.CLK = CP ;
  351. │  page 9
  352. │STATE_DIAGRAM PS
  353. │   STATE AA :
  354. │      [R,S,T]=[1,0,0] ;
  355. │      CASE
  356. │         !U : AA
  357. │          U : BB
  358. │      ENDCASE ;
  359. │   STATE BB :
  360. │      [R,S]=[0,1] ;
  361. │      CASE
  362. │         !V : CC
  363. │            WITH
  364. │               T = 1 ;
  365. │            ENDWITH ;
  366. │          V : DD
  367. │            WITH
  368. │               T = 0 ;
  369. │            ENDWITH ;
  370. │      ENDCASE ;
  371. │   STATE CC :
  372. │      [R,S,T]=[0,0,0] ;
  373. │      CASE
  374. │         !V & W : CC
  375. │          V & W : DD
  376. │             !W : AA
  377. │      ENDCASE ;
  378. │   STATE DD :
  379. │      [R,S,T]=[1,1,0] ;
  380. │      CASE
  381. │         1 : AA
  382. │      ENDCASE ;
  383. │DECLARATIONS
  384. │   NS = [Q1,Q0] ; "NEXT STATE"
  385. │  page 10
  386. │TEST_VECTORS
  387. │  ([MR,CP,U,V,W] -> [PS,R,S,T])
  388. │   [ 0, X,X,X,X] -> [AA,1,0,0]; "RESET"
  389. │   [ 1, C,0,X,X] -> [AA,1,0,0]; "AA->AA"
  390. │   [ 1, C,1,X,X] -> [BB,0,1,X]; "AA->BB (T IS X)"
  391. │   [ 1, 0,X,0,X] -> [BB,0,1,1]; "BB/T"
  392. │   [ 1, 0,X,1,X] -> [BB,0,1,0]; "BB/!T"
  393. │   [ 1, C,X,0,X] -> [CC,0,0,0]; "BB->CC"
  394. │   [ 1, C,X,0,1] -> [CC,0,0,0]; "CC->CC"
  395. │   [ 1, C,X,X,0] -> [AA,1,0,0]; "CC->AA"
  396. │   [ 1, C,1,X,X] -> [BB,0,1,X]; "AA->BB (T IS X)"
  397. │   [ 1, C,X,1,X] -> [DD,1,1,0]; "BB->DD"
  398. │   [ 1, C,X,X,X] -> [AA,1,0,0]; "DD->AA"
  399. │   [ 1, C,1,X,X] -> [BB,0,1,X]; "AA->BB (T IS X)"
  400. │   [ 1, C,X,0,X] -> [CC,0,0,0]; "BB->CC"
  401. │   [ 1, C,X,1,1] -> [DD,1,1,0]; "CC->DD"
  402. │   [ 1, C,X,X,X] -> [AA,1,0,0]; "DD->AA"
  403. │END
  404. └─
  405.  
  406. Now compile, simulate and generate a JEDEC file using ABEL.
  407.  
  408.  page 11
  409.  
  410.           Example 2 : A Mealy machine with One-Hot state assignment
  411.           ---------------------------------------------------------
  412.  
  413. In this example we will design the same state machine that we designed before,
  414. but we will use the One-Hot state assignment. for this kind of assignment
  415. we need 4 flip-flops. This time we will run ASTATER.EXE using the same command
  416. line parameters except the number of flip-flops that is 4 and the name of the
  417. machine that will be changed to M2. Here is how the command line looks:
  418.  
  419. ASTATER M2 3 3 3 2 /2 AA BB CC DD
  420.  
  421. The file that will be generated looks like the file we got earlier but with
  422. more flip-flops. All the replacements we did before will be done here too:
  423.  
  424. - Replace input1 with U
  425.  
  426. - Replace input2 with V
  427.  
  428. - Replace input3 with W
  429.  
  430. - Replace output1 with R
  431.  
  432. - Replace output2 with S
  433.  
  434. - Replace output3 with T
  435.  
  436. The main difference between this example and the previous example, is in the
  437. state assignments. Write the following one-hot state assignments:
  438.  
  439.         AA = [1,0,0,0], BB = [0,1,0,0], CC = [0,0,1,0] DD = [0,0,0,1]
  440.  
  441. Other important change that must be done (that differ from the previous
  442. example) is to change the declaration of node Q0 from ISTYPE 'REG,BUFFER' to
  443. ISTYPE 'REG,INVERT'. This change is done because we want the reset state to
  444. be AA [1,0,0,0]. When MR is invoked (MR is active-low) we want the machine to
  445. be in the AA state. In this state Q0 (the flip-flop of state AA) must be in a
  446. High (1) state.
  447.  
  448. All the other changes we had to make in this example to the original ASTATER
  449. generated source file, are the same changes we had to do in the previous
  450. example. Here are all the changes that need to be done:
  451.  
  452. - Delete WITH..ENDWITH blocks from first, third and last state blocks. These
  453.   blocks describe Moore type behavior.
  454.  
  455. - Replace dummy conditions (condition1,condition2...) and next_states
  456.   (next_state1, next_state2...) with real conditions and real next_states and
  457.   delete lines that are not needed.
  458.  
  459.  page 12
  460.  
  461. - Replace zero output assignments (Mealy and Moore type) with real output
  462.   assignments and delete output assignments that are not needed.
  463.  
  464. - Add test vector values.
  465.  
  466. Now the file will look like this:
  467.  
  468.                                     M2.ABL
  469. ┌─
  470. │MODULE M2
  471. │TITLE 'M2.ABL created by ASTATER.EXE Version 1.0
  472. │       Time of creation is Sat Aug 20 17:07:13 1994
  473. │      '
  474. │DECLARATIONS
  475. │   M2 DEVICE ;
  476. │   U PIN ;
  477. │   V PIN ;
  478. │   W PIN ;
  479. │   CP PIN ; "CLOCK INPUT"
  480. │   MR PIN ; "MASTER RESET (ASYN) INPUT"
  481. │   R PIN ISTYPE 'COM' ;
  482. │   S PIN ISTYPE 'COM' ;
  483. │   T PIN ISTYPE 'COM' ;
  484. │   Q3 NODE ISTYPE 'REG,BUFFER' ;
  485. │   Q2 NODE ISTYPE 'REG,BUFFER' ;
  486. │   Q1 NODE ISTYPE 'REG,BUFFER' ;
  487. │   Q0 NODE ISTYPE 'REG,INVERT' ;
  488. │   PS = [Q3,Q2,Q1,Q0] ; "STATE ASSIGNMENT"
  489. │   AA = [ 0, 0, 0, 1] ;
  490. │   BB = [ 0, 0, 1, 0] ;
  491. │   CC = [ 0, 1, 0, 0] ;
  492. │   DD = [ 1, 0, 0, 0] ;
  493. │   C , X , P , Z = .C. , .X. , .P. , .Z. ;
  494. │EQUATIONS
  495. │   PS.AR = !MR ;
  496. │   PS.CLK = CP ;
  497. │  page 13
  498. │STATE_DIAGRAM PS
  499. │   STATE AA :
  500. │      [R,S,T]=[1,0,0] ;
  501. │      CASE
  502. │         !U : AA
  503. │          U : BB
  504. │      ENDCASE ;
  505. │   STATE BB :
  506. │      [R,S]=[0,1] ;
  507. │      CASE
  508. │         !V : CC
  509. │            WITH
  510. │               T = 1 ;
  511. │            ENDWITH ;
  512. │          V : DD
  513. │            WITH
  514. │               T = 0 ;
  515. │            ENDWITH ;
  516. │      ENDCASE ;
  517. │   STATE CC :
  518. │      [R,S,T]=[0,0,0] ;
  519. │      CASE
  520. │         !V & W : CC
  521. │          V & W : DD
  522. │             !W : AA
  523. │      ENDCASE ;
  524. │   STATE DD :
  525. │      [R,S,T]=[1,1,0] ;
  526. │      CASE
  527. │         1 : AA
  528. │      ENDCASE ;
  529. │DECLARATIONS
  530. │   NS = [Q1,Q0] ; "NEXT STATE"
  531. │  page 14
  532. │TEST_VECTORS
  533. │  ([MR,CP,U,V,W] -> [PS,R,S,T])
  534. │   [ 0, X,X,X,X] -> [AA,1,0,0]; "RESET"
  535. │   [ 1, C,0,X,X] -> [AA,1,0,0]; "AA->AA"
  536. │   [ 1, C,1,X,X] -> [BB,0,1,X]; "AA->BB (T IS X)"
  537. │   [ 1, 0,X,0,X] -> [BB,0,1,1]; "BB/T"
  538. │   [ 1, 0,X,1,X] -> [BB,0,1,0]; "BB/!T"
  539. │   [ 1, C,X,0,X] -> [CC,0,0,0]; "BB->CC"
  540. │   [ 1, C,X,0,1] -> [CC,0,0,0]; "CC->CC"
  541. │   [ 1, C,X,X,0] -> [AA,1,0,0]; "CC->AA"
  542. │   [ 1, C,1,X,X] -> [BB,0,1,X]; "AA->BB (T IS X)"
  543. │   [ 1, C,X,1,X] -> [DD,1,1,0]; "BB->DD"
  544. │   [ 1, C,X,X,X] -> [AA,1,0,0]; "DD->AA"
  545. │   [ 1, C,1,X,X] -> [BB,0,1,X]; "AA->BB (T IS X)"
  546. │   [ 1, C,X,0,X] -> [CC,0,0,0]; "BB->CC"
  547. │   [ 1, C,X,1,1] -> [DD,1,1,0]; "CC->DD"
  548. │   [ 1, C,X,X,X] -> [AA,1,0,0]; "DD->AA"
  549. │END
  550. └─
  551.  
  552. Now compile, simulate and generate a JEDEC file using ABEL.
  553.  
  554.  page 15
  555.                Example 3 : A Moore machine with direct outputs
  556.                -----------------------------------------------
  557.  
  558. In this example we will be designing the following Moore machine:
  559.  
  560.  
  561.             ┌───────────────┬─────────┬┬───────────────┬─────────┐
  562.             │ Present State │  Input  ││  Next State   │ Output  │
  563.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  564.             │       AA      │   !U    ││      AA       │    R    │
  565.             │               │    U    ││      BB       │    R    │
  566.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  567.             │       BB      │   !V    ││      CC       │   S,T   │
  568.             │               │    V    ││      DD       │   S,T   │
  569.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  570.             │       CC      │ !V & W  ││      CC       │    -    │
  571.             │               │  V & W  ││      DD       │    -    │
  572.             │               │     !W  ││      AA       │    -    │
  573.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  574.             │       DD      │    1    ││      AA       │   R,S   │
  575.             └───────────────┴─────────┴┴───────────────┴─────────┘
  576.  
  577. This machine has 3 inputs an 3 outputs and behaves almost exactly like the
  578. machine from the previous examples. The only difference is that the T output
  579. dose not change as a function of V, when the machine is in the BB state (it
  580. used to change on the first and second examples).
  581.  
  582. In the previous examples the outputs of the machine were not directly the
  583. outputs of the flip-flops. Combinatorial logic was used to decode the
  584. flip-flop outputs combinations to machine output combinations (a waste of
  585. hardware resources).
  586.  
  587.  
  588.                                   CP ─>─┐
  589.                      ┌────────────────┐ │  ┌──────┐
  590.                      │  Cmbinational  ├─┼─>┤D1    ├─┬─ Q1
  591.                      │                │ ├──┤> FF  │ │
  592.                      │ Sum of product │ │  └──────┘ │
  593.                      │                ├─┼─────<─────┘ foldback
  594.             U ──────>┤     Matrix     │ │  ┌──────┐
  595.                      │                ├─┼─>┤D1    ├─┬─ Q0
  596.             V ──────>┤                │ └──┤> FF  │ │
  597.                      │                │    └──────┘ │
  598.             W ──────>┤                ├───────<─────┘ foldback
  599.                      │              d │
  600.                      │              e ├───────>─────── R
  601.                      │              c │
  602.                      │              o ├───────>─────── S
  603.                      │              d │
  604.                      │              e ├───────>─────── T
  605.                      └────────────────┘
  606.  page 16
  607.  
  608. When a design of this type is implemented with a flip-flop that has no buried
  609. registers, it wastes pins (ABEL will automatically exchange NODEs to PINs if
  610. the device has no nodes).
  611.  
  612. When designing a Moore machine, one can assign flip-flops so the outputs of
  613. machine will be directly the outputs of filp-flops.
  614.  
  615.  
  616.  
  617.                                   CP ─>─┐
  618.                      ┌────────────────┐ │  ┌──────┐
  619.                      │  Cmbinational  ├─┼─>┤DR    ├─┬─ R
  620.                      │                │ ├──┤> FF  │ │
  621.                      │ Sum of product │ │  └──────┘ │
  622.                      │                ├─┼─────<─────┘
  623.             U ──────>┤     Matrix     │ │  ┌──────┐
  624.                      │                ├─┼─>┤DS    ├─┬─ S
  625.             V ──────>┤                │ ├──┤> FF  │ │
  626.                      │                │ │  └──────┘ │
  627.             W ──────>┤                ├─┼─────<─────┘
  628.                      │                │ │  ┌──────┐
  629.                      │                ├─┼─>┤DT    ├─┬─ T
  630.                      │                │ └──┤> FF  │ │
  631.                      │                │    └──────┘ │
  632.                      │                ├───────<─────┘
  633.                      └────────────────┘
  634.  
  635. This will save pins of the PAL, reduce tpd (from the clock signal to the
  636. outputs), and produce clean outputs with no spikes. Not all outputs have to be
  637. produced this way. Some times a mixture of direct and indirect outputs is also
  638. chosen.
  639.  
  640. In this example we want all outputs to come directly from flip-flop outputs.
  641. To do this we choose to define zero outputs in the command line of ASTATER.
  642. The number of outputs defined for ASTATER is the number of indirect outputs !
  643. We also chose three flip-flops (a flip-flop for every output). This is the
  644. command and command line parameters used:
  645.  
  646. ASTATER M3 3 0 3 3 /1 AA BB CC DD
  647.  
  648.  page 17
  649.  
  650. Here is the file that will be created by ASTATER.EXE :
  651.  
  652.  
  653.                                     M3.ABL
  654. ┌─
  655. │MODULE M3
  656. │TITLE 'M3.ABL created by ASTATER.EXE Version 1.0
  657. │       Time of creation is Sat Aug 20 17:07:13 1994
  658. │      '
  659. │DECLARATIONS
  660. │   M3 DEVICE ;
  661. │   input1 PIN ;
  662. │   input2 PIN ;
  663. │   input3 PIN ;
  664. │   CP PIN ; "CLOCK INPUT"
  665. │   MR PIN ; "MASTER RESET (ASYN) INPUT"
  666. │   Q2 NODE ISTYPE 'REG,BUFFER' ;
  667. │   Q1 NODE ISTYPE 'REG,BUFFER' ;
  668. │   Q0 NODE ISTYPE 'REG,BUFFER' ;
  669. │   PS = [Q2,Q1,Q0] ; "STATE ASSIGNMENT"
  670. │   AA = [ 0, 0, 0] ;
  671. │   BB = [ 0, 0, 0] ;
  672. │   CC = [ 0, 0, 0] ;
  673. │   DD = [ 0, 0, 0] ;
  674. │   C , X , P , Z = .C. , .X. , .P. , .Z. ;
  675. │EQUATIONS
  676. │   PS.AR = !MR ;
  677. │   PS.CLK = CP ;
  678. │  page 18
  679. │STATE_DIAGRAM PS
  680. │   STATE AA :
  681. │      CASE
  682. │         condition11 : next_state11
  683. │         condition12 : next_state12
  684. │         condition13 : next_state13
  685. │      ENDCASE ;
  686. │   STATE BB :
  687. │      CASE
  688. │         condition21 : next_state21
  689. │         condition22 : next_state22
  690. │         condition23 : next_state23
  691. │      ENDCASE ;
  692. │   STATE CC :
  693. │      CASE
  694. │         condition31 : next_state31
  695. │         condition32 : next_state32
  696. │         condition33 : next_state33
  697. │      ENDCASE ;
  698. │   STATE DD :
  699. │      CASE
  700. │         condition41 : next_state41
  701. │         condition42 : next_state42
  702. │         condition43 : next_state43
  703. │      ENDCASE ;
  704. │DECLARATIONS
  705. │   NS = [Q2,Q1,Q0] ; "NEXT STATE"
  706. │TEST_VECTORS
  707. │   ([MR,CP,input1,input2,input3] -> NS ;
  708. │END
  709. └─
  710.  
  711. Notice that the Mealy output assignments are missing now from the file.
  712.  
  713.  page 19
  714.  
  715. All the replacements we did in previous examples are done here in the same
  716. way:
  717.  
  718. - Replace input1 with U
  719.  
  720. - Replace input2 with V
  721.  
  722. - Replace input3 with W
  723.  
  724. - There are no replacements for output1/2/3 because they were not generated in
  725.   file
  726.  
  727. The main difference between this implementation and the previous ones is in
  728. the state assignments. Write the following state assignments:
  729.  
  730.             AA = [1,0,0], BB = [0,1,1], CC = [0,0,0], DD = [1,1,0]
  731.  
  732. In case a unique assignment for each state could not be found more flip-flops
  733. could be appended to the state register (we do not need to add flip-flops in
  734. this example).
  735.  
  736. Other important change that must be made is to change node Q0 from ISTYPE
  737. 'REG,BUFFER'to ISTYPE 'REG,INVERT'. This is because we want the reset state to
  738. be AA. When MR is invoked (low) we want the machine to be in the AA state. In
  739. this state Q0 (the flip-flop that is a direct output implementing the R output
  740. of the machine) must be in a High (1) state.
  741.  
  742. All the other changes we have to make to the original ASTATER generated file
  743. are the same changes we did in the previous examples. Here are all the changes
  744. that need to be done:
  745.  
  746. - Replace dummy conditions (condition1, condition2...) and next_states
  747.   (next_state1, next_state2...) with real conditions and next_states and
  748.   delete lines that are not needed.
  749.  
  750. - Add test vector values.
  751.  
  752.  page 20
  753.  
  754. Now the file will look like this:
  755.  
  756.                                     M3.ABL
  757. ┌─
  758. │MODULE M3
  759. │TITLE 'M3.ABL created by ASTATER.EXE Version 1.0
  760. │       Time of creation is Sat Aug 20 17:07:13 1994
  761. │      '
  762. │DECLARATIONS
  763. │   M3 DEVICE ;
  764. │   U PIN ;
  765. │   V PIN ;
  766. │   W PIN ;
  767. │   CP PIN ; "CLOCK INPUT"
  768. │   MR PIN ; "MASTER RESET (ASYN) INPUT"
  769. │   Q2 NODE ISTYPE 'REG,INVERT' ;
  770. │   Q1 NODE ISTYPE 'REG,BUFFER' ;
  771. │   Q0 NODE ISTYPE 'REG,BUFFER' ;
  772. │   PS = [Q2,Q1,Q0] ; "STATE ASSIGNMENT"
  773. │   AA = [ 1, 0, 0] ;
  774. │   BB = [ 0, 1, 1] ;
  775. │   CC = [ 0, 0, 0] ;
  776. │   DD = [ 1, 1, 0] ;
  777. │   C , X , P , Z = .C. , .X. , .P. , .Z. ;
  778. │EQUATIONS
  779. │   PS.AR = !MR ;
  780. │   PS.CLK = CP ;
  781. │STATE_DIAGRAM PS
  782. │  page 21
  783. │   STATE AA :
  784. │      CASE
  785. │         !U : AA
  786. │          U : BB
  787. │      ENDCASE ;
  788. │   STATE BB :
  789. │      CASE
  790. │         !V : CC
  791. │          V : DD
  792. │      ENDCASE ;
  793. │   STATE CC :
  794. │      CASE
  795. │         !V & W : CC
  796. │          V & W : DD
  797. │             !W : AA
  798. │      ENDCASE ;
  799. │   STATE DD :
  800. │      CASE
  801. │         1 : AA
  802. │      ENDCASE ;
  803. │DECLARATIONS
  804. │   NS = [Q2,Q1,Q0] ; "NEXT STATE"
  805. │TEST_VECTORS
  806. │   ([MR,CP,U,V,W] -> NS)
  807. │    [ 0, X,X,X,X] -> AA; "RESET"
  808. │    [ 1, C,0,X,X] -> AA; "AA->AA"
  809. │    [ 1, C,1,X,X] -> BB; "AA->BB"
  810. │    [ 1, C,X,0,X] -> CC; "BB->CC"
  811. │    [ 1, C,X,0,1] -> CC; "CC->CC"
  812. │    [ 1, C,X,X,0] -> AA; "CC->AA"
  813. │    [ 1, C,1,X,X] -> BB; "AA->BB"
  814. │    [ 1, C,X,1,X] -> DD; "BB->DD"
  815. │    [ 1, C,X,X,X] -> AA; "DD->AA"
  816. │    [ 1, C,1,X,X] -> BB; "AA->BB"
  817. │    [ 1, C,X,0,X] -> CC; "BB->CC"
  818. │    [ 1, C,X,1,1] -> DD; "CC->DD"
  819. │    [ 1, C,X,X,X] -> AA; "DD->AA"
  820. │END
  821. └─
  822. Now compile, simulate and generate a JEDEC file using ABEL.
  823.  
  824.  page 21
  825.                Example 4 : A Moore mixed example
  826.                ---------------------------------
  827.  
  828. In this example we will be designing the following Moore machine:
  829.  
  830.                                  ┌─────────┐
  831.                            I ───>┤         ├──>─ P
  832.                            J ───>┤         ├──>─ Q
  833.                 Inputs     K ───>┤    M4   ├──>─ R     Outputs
  834.                            L ───>┤         ├──>─ S
  835.                            M ───>┤         ├──>─ T
  836.                                  └────┬────┘
  837.                                       │
  838.                               Cp ──>──┘
  839.  
  840.  
  841.             ┌───────────────┬─────────┬┬───────────────┬─────────┐
  842.             │ Present State │  Input  ││  Next State   │ Output  │
  843.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  844.             │       AA      │   !I    ││      AA       │    P    │
  845.             │               │    I    ││      BB       │    P    │
  846.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  847.             │       BB      │   !J    ││      BB       │    Q    │
  848.             │               │    J    ││      CC       │    Q    │
  849.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  850.             │       CC      │  I $ J  ││      DD       │    -    │
  851.             │               │  I!$ J  ││      CC       │    -    │
  852.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  853.             │       DD      │  K # L  ││      EE       │   R,T   │
  854.             │               │ !K & !L ││      DD       │   R,T   │
  855.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  856.             │       EE      │   !M    ││      EE       │   S,T   │
  857.             │               │    M    ││      FF       │   S,T   │
  858.             ├───────────────┼─────────┼┼───────────────┼─────────┤
  859.             │       FF      │    1    ││      AA       │  R,S,T  │
  860.             └───────────────┴─────────┴┴───────────────┴─────────┘
  861.  page 22
  862.  
  863. This machine has 5 inputs an 5 outputs and behaves as a moore machine.
  864.  
  865. Suppose we need that the outputs P,Q and T be clean outputs that do not
  866. produce decoding spikes (because they drive for example an asynchronous reset
  867. of a flip-flop or a write-enable input of a RAM) It is recommended to use a
  868. One-Hot state assignment for state A and B because the P and Q outputs are
  869. active only on state AA and BB. We will assign state AA to flip-flop Q2 and
  870. state BB to flip flop Q3. The outputs of the flip-flops Q2 and Q3 will be P
  871. and Q outputs respectively. The T output is not unique to only one state, so
  872. we will not be able to use a one hot assignment in order to produce it. We
  873. will just add a special flip-flop that will produce this output directly. This
  874. will be flip-flop Q4. The output of Q4 is the output T (T is a direct output).
  875.  
  876. Suppose that the other outputs are allowed to have decoding spikes (because
  877. they drive for example other synchronous devices that share the same clock).
  878. Also suppose for example, that target device has unused buried nodes. We will
  879. want to use the buried nodes and not waste any more output macrocells of the
  880. device. We can choose to fully encode the other state combinations and assign
  881. them to a pair of flip-flops called Q1 and Q0. We will assign CC to
  882. [Q1,Q0] = [0,0], DD to [Q1,Q0] = [0,1], EE to [Q1,Q0] = [1,0] and FF to
  883. [Q1,Q0] = [1,1]
  884.  
  885. When we use ASTATER.EXE we need only to declare to outputs (R and S), which
  886. are indirect outputs. All other outputs (P,Q and T) are direct flip-flop
  887. outputs. The total number of flip-flops will be 1 + 1 + 1 + 2 = 5. The number
  888. of states is 6 and number of transitions is 2. The number of inputs is 5.
  889.  
  890. The command and command line parameters used in this example are:
  891.  
  892. ASTATER M4 5 2 2 5 /1 AA BB CC DD EE FF
  893.  
  894.  page 23
  895.  
  896. Here is the file that will be created by ASTATER.EXE :
  897.  
  898.  
  899.                                     M4.ABL
  900. ┌─
  901. │MODULE M4
  902. │TITLE 'M4.ABL created by ASTATER.EXE Version 1.0
  903. │       Time of creation is Sat Aug 20 17:07:13 1994
  904. │      '
  905. │DECLARATIONS
  906. │   M4 DEVICE ;
  907. │   input1 PIN ;
  908. │   input2 PIN ;
  909. │   input3 PIN ;
  910. │   input4 PIN ;
  911. │   input5 PIN ;
  912. │   CP PIN ; "CLOCK INPUT"
  913. │   MR PIN ; "MASTER RESET (ASYN) INPUT"
  914. │   output1 PIN ISTYPE 'COM' ;
  915. │   output2 PIN ISTYPE 'COM' ;
  916. │   Q4 NODE ISTYPE 'REG,BUFFER' ;
  917. │   Q3 NODE ISTYPE 'REG,BUFFER' ;
  918. │   Q2 NODE ISTYPE 'REG,BUFFER' ;
  919. │   Q1 NODE ISTYPE 'REG,BUFFER' ;
  920. │   Q0 NODE ISTYPE 'REG,BUFFER' ;
  921. │   PS = [Q4,Q3,Q2,Q1,Q0] ; "STATE ASSIGNMENT"
  922. │   AA = [ 0, 0, 0, 0, 0] ;
  923. │   BB = [ 0, 0, 0, 0, 0] ;
  924. │   CC = [ 0, 0, 0, 0, 0] ;
  925. │   DD = [ 0, 0, 0, 0, 0] ;
  926. │   EE = [ 0, 0, 0, 0, 0] ;
  927. │   FF = [ 0, 0, 0, 0, 0] ;
  928. │   C , X , P , Z = .C. , .X. , .P. , .Z. ;
  929. │EQUATIONS
  930. │   PS.AR = !MR ;
  931. │   PS.CLK = CP ;
  932.  page 24
  933.  
  934. │STATE_DIAGRAM PS
  935. │   STATE AA :
  936. │      [output1,output2] = [0,0] ;
  937. │      CASE
  938. │         condition11 : next_state11
  939. │         condition12 : next_state12
  940. │      ENDCASE ;
  941. │   STATE BB :
  942. │      [output1,output2] = [0,0] ;
  943. │      CASE
  944. │         condition21 : next_state21
  945. │         condition22 : next_state22
  946. │      ENDCASE ;
  947. │   STATE CC :
  948. │      [output1,output2] = [0,0] ;
  949. │      CASE
  950. │         condition31 : next_state31
  951. │         condition32 : next_state32
  952. │      ENDCASE ;
  953. │   STATE DD :
  954. │      [output1,output2] = [0,0] ;
  955. │      CASE
  956. │         condition41 : next_state41
  957. │         condition42 : next_state42
  958. │      ENDCASE ;
  959. │   STATE EE :
  960. │      [output1,output2] = [0,0] ;
  961. │      CASE
  962. │         condition51 : next_state51
  963. │         condition52 : next_state52
  964. │      ENDCASE ;
  965. │   STATE FF :
  966. │      [output1,output2] = [0,0] ;
  967. │      CASE
  968. │         condition61 : next_state61
  969. │         condition62 : next_state62
  970. │      ENDCASE ;
  971. │DECLARATIONS
  972. │   NS = [Q4,Q3,Q2,Q1,Q0] ; "NEXT STATE"
  973. │TEST_VECTORS
  974. │   ([MR,CP,input1,input2,input3,input4,input5] -> [NS,output1,output2])
  975. │END
  976. └─
  977.  page 25
  978.  
  979. Here is the file after making changes with an editor:
  980.  
  981.                                     M4.ABL
  982. ┌─
  983. │MODULE M4
  984. │TITLE 'M4.ABL created by ASTATER.EXE Version 1.0
  985. │       Time of creation is Sat Aug 20 17:07:13 1994
  986. │      '
  987. │DECLARATIONS
  988. │   M4 DEVICE ;
  989. │   I PIN ;
  990. │   J PIN ;
  991. │   K PIN ;
  992. │   L PIN ;
  993. │   M PIN ;
  994. │   CP PIN ; "CLOCK INPUT"
  995. │   MR PIN ; "MASTER RESET (ASYN) INPUT"
  996. │   R PIN ISTYPE 'COM' ;
  997. │   S PIN ISTYPE 'COM' ;
  998. │   Q4 PIN  ISTYPE 'REG,BUFFER' ;
  999. │   Q3 PIN ISTYPE 'REG,BUFFER' ;
  1000. │   Q2 PIN ISTYPE 'REG,INVERT' ;
  1001. │   Q1 NODE ISTYPE 'REG,BUFFER' ;
  1002. │   Q0 NODE ISTYPE 'REG,BUFFER' ;
  1003. │   PS = [Q4,Q3,Q2,Q1,Q0] ; "STATE ASSIGNMENT"
  1004. │   AA = [ 0, 0, 1, 0, 0] ;
  1005. │   BB = [ 0, 1, 0, 0, 0] ;
  1006. │   CC = [ 0, 0, 0, 0, 0] ;
  1007. │   DD = [ 1, 0, 0, 0, 1] ;
  1008. │   EE = [ 1, 0, 0, 1, 0] ;
  1009. │   FF = [ 1, 0, 0, 1, 1] ;
  1010. │   C , X , P , Z = .C. , .X. , .P. , .Z. ;
  1011. │EQUATIONS
  1012. │   PS.AR = !MR ;
  1013. │   PS.CLK = CP ;
  1014.  
  1015.  page 26
  1016.  
  1017. │STATE_DIAGRAM PS
  1018. │   STATE AA :
  1019. │      [R,S] = [0,0] ;
  1020. │      CASE
  1021. │         !I : AA
  1022. │          I : BB
  1023. │      ENDCASE ;
  1024. │   STATE BB :
  1025. │      [R,S] = [0,0] ;
  1026. │      CASE
  1027. │         !J : BB
  1028. │          J : CC
  1029. │      ENDCASE ;
  1030. │   STATE CC :
  1031. │      [R,S] = [0,0] ;
  1032. │      CASE
  1033. │         I $ J  : DD
  1034. │         I !$ J : CC
  1035. │      ENDCASE ;
  1036. │   STATE DD :
  1037. │      [R,S] = [1,0] ;
  1038. │      CASE
  1039. │          K #  L : EE
  1040. │         !K & !L : DD
  1041. │      ENDCASE ;
  1042. │    STATE EE :
  1043. │       [R,S] = [0,1] ;
  1044. │       CASE
  1045. │         !M : EE
  1046. │          M : FF
  1047. │      ENDCASE ;
  1048. │   STATE FF :
  1049. │      [R,S] = [1,1] ;
  1050. │      CASE
  1051. │         1 : AA
  1052. │      ENDCASE ;
  1053. │DECLARATIONS
  1054. │   NS = [Q4,Q3,Q2,Q1,Q0] ; "NEXT STATE"
  1055.  
  1056.  page 27
  1057.  
  1058. │TEST_VECTORS
  1059. │   ([MR,CP,I,J,K,L,M] -> [NS,R,S])
  1060. │    [ 0, X,X,X,X,X,X] -> [AA,0,0]; "P IS 1"
  1061. │    [ 1, C,0,X,X,X,X] -> [AA,0,0]; "P IS 1"
  1062. │    [ 1, C,1,X,X,X,X] -> [BB,0,0]; "Q IS 1"
  1063. │    [ 1, C,X,0,X,X,X] -> [BB,0,0]; "Q IS 1"
  1064. │    [ 1, C,X,1,X,X,X] -> [CC,0,0];
  1065. │    [ 1, C,0,0,X,X,X] -> [CC,0,0];
  1066. │    [ 1, C,1,1,X,X,X] -> [CC,0,0];
  1067. │    [ 1, C,0,1,X,X,X] -> [DD,1,0];
  1068. │    [ 1, C,X,X,0,0,X] -> [DD,1,0]; "T IS 1"
  1069. │    [ 1, C,X,X,1,1,X] -> [EE,0,1]; "T IS 1"
  1070. │    [ 1, C,X,X,0,0,0] -> [EE,0,1]; "T IS 1"
  1071. │    [ 1, C,X,X,0,0,1] -> [FF,1,1]; "T IS 1"
  1072. │    [ 1, C,X,X,X,X,X] -> [AA,0,0]; "P IS 1"
  1073. │END
  1074. └─
  1075.  
  1076. The following changes were made:
  1077.  
  1078. input1 -> I
  1079. input2 -> J
  1080. input3 -> K
  1081. input4 -> L
  1082. input5 -> M
  1083.  
  1084. output1 -> R
  1085. output2 -> S
  1086.  
  1087. State Assignment:
  1088.    AA = [ 0, 0, 1, 0, 0] ;
  1089.    BB = [ 0, 1, 0, 0, 0] ;
  1090.    CC = [ 0, 0, 0, 0, 0] ; 
  1091.    DD = [ 1, 0, 0, 0, 1] ;
  1092.    EE = [ 1, 0, 0, 1, 0] ;
  1093.    FF = [ 1, 0, 0, 1, 1] ;
  1094.  
  1095. Inserting the true outputs of R & S
  1096.  
  1097. Inserting transition conditions
  1098.  
  1099. Changing attribute of Q2 from 'REG,BUFFER' to 'REG,INVERT'
  1100.  
  1101. Changing signal type of Q4,Q3 and Q2 from NODE to PIN
  1102.  
  1103. Adding test vector values
  1104.  
  1105.  page 28
  1106.                        Errors, Warning & Note Messages
  1107.                        -------------------------------
  1108.  
  1109. If any error occurs the program will abort execution. Some errors will
  1110. generate a help screen. this is the help screen:
  1111.  
  1112. ------------------------------------usage-------------------------------------
  1113.   ASTATER <module> <in> <out> <con> <ff> /1|2 <state_name> <state_name>...
  1114. ---------------------------------parameters-----------------------------------
  1115.   <module>.........................Module name \(file_name = module_name.ABL
  1116.   <in>...............................................Number of input signals
  1117.   <out>..............Number of output signals that are not flip-flop outputs
  1118.   <cond>......................Maximum number of relevant condition per state
  1119.   <ff>..................................................Number of flip-flops
  1120.   /1|2|3...................Machine type : /1 - Moore , /2 - Mealy , /3 Dummy
  1121.   <state><state>.........................A list of state names (two or more)
  1122. ------------------------------------------------------------------------------
  1123.  
  1124. Here is a the list of errors that the program can report:
  1125.  
  1126. Error (1) : Define number of inputs.
  1127.  
  1128.             The number of inputs parameter is not defined correctly. It has to
  1129.             be an integer.
  1130.  
  1131.  
  1132. Error (2) : Define number of outputs.
  1133.  
  1134.             The number of outputs parameter is not defined correctly. It has
  1135.             to be an integer.
  1136.  
  1137.  
  1138. Error (3) : Define maximum number of transition conditions.
  1139.  
  1140.             The maximum number of outputs parameter is not defined correctly.
  1141.             It has to be an integer.
  1142.  
  1143.  
  1144. Error (4) : Define number of flip flops.
  1145.  
  1146.             The number of flip-flops parameter is not defined correctly. It
  1147.             has to be an integer.
  1148.  
  1149.  
  1150. Error (5) : Define machine type - moore (/1) or Mealy.
  1151.  
  1152.             The type of the machine is not defined correctly. It
  1153.             has to be a foreslash (/) followed by an integer.
  1154.  
  1155.  page 29
  1156.  
  1157. Error (6) : Machine type 'n' is an unknown machine_type.
  1158.  
  1159.             The type of the machine number is not defined correctly. It
  1160.             has to be a /1 (Moore) or /2 (Mealy).
  1161.  
  1162.  
  1163. Error (7) : Can't create file 'file_name' for writing.
  1164.  
  1165.  
  1166. Error (8) : Autonomous state machine is not supported.
  1167.  
  1168.             Autonomous transitions are supported, but only if they are not
  1169.             global. Read on previous text how to describe Autonomous
  1170.             transitions using the CASE..ENDCASE syntax.
  1171.  
  1172.  
  1173. Error (9) : Too many inputs.
  1174.  
  1175.             The maximum number of allowed inputs is 30.
  1176.  
  1177.  
  1178. Error (10) : Too many outputs.
  1179.  
  1180.              The maximum number of allowed outputs is 30.
  1181.  
  1182.  
  1183. Error (11) : Calculated number of transition conditions is too big.
  1184.  
  1185.              Defined number of transition conditions by user was zero. In a
  1186.              situation like this the software normally chooses a number
  1187.              that is equal to (2)^(number_of_inputs). In this case the
  1188.              calculated number is too big.
  1189.  
  1190.  
  1191. Error (12) : Too many transition conditions.
  1192.  
  1193.              The maximum number of allowed conditions is 4096.
  1194.  
  1195.  
  1196. Error (13) : No flip-flops in machine.
  1197.  
  1198.              A state machine with no Flip-Flops is not a state machine. It is
  1199.              a combinatorial system.
  1200.  
  1201.  
  1202. Error (14) : Too many flip-flops.
  1203.  
  1204.              A maximum of 30 flip-flops is allowed.
  1205.  
  1206.  page 30
  1207.  
  1208. Error (15) : 'n' states can not be assigned to only 'm' flip-flop(s).
  1209.  
  1210.              If for example you tried to declare tow flip-flops and six states
  1211.              it will not be possible to assign all six states to only four
  1212.              possible flip-flop combinations. This is because tow flip flops
  1213.              can decode only four states.
  1214.  
  1215.  
  1216. Error (16): Missing command line parameter(s).
  1217.  
  1218.             The minimum number of command line parameters must be at least 7:
  1219.  
  1220.             - number of inputs
  1221.             - number of outputs
  1222.             - maximum number of input conditions
  1223.             - number of flip-flops
  1224.             - machine type
  1225.             - a first state name
  1226.             - a second state name
  1227.  
  1228. Error (17): A Mealy type machine with no indirect outputs.
  1229.  
  1230.             Declaration of a mealy machine with no outputs is impossible
  1231.             because a mealy machine must have at least one output that depends
  1232.             on an input and not only on flip-flops.
  1233.  
  1234. Here is a list of Errorlevel that are set when exiting the program:
  1235.  
  1236.                      0 - Successful execution
  1237.                      1 - Bad numeric values of parameters
  1238.                      2 - Bad definition of parameters
  1239.                      3 - File Overwrite not allowed
  1240.                      4 - File write problems
  1241.  
  1242. Warnings & Notes will not be followed by aborting of execution. Warnings are
  1243. for making you pay attention because some thing bad might be going on. Notes
  1244. are only for informing you.
  1245.  
  1246.  page 31
  1247.  
  1248. Here is a list of Warnings that the program can report:
  1249.  
  1250.  
  1251. Warning (1) : Output file 'file_name' already exists.
  1252.  
  1253.               The user has an option to Overwrite it (by hitting the <Y> key)
  1254.               or to abort (hitting any other key)
  1255.  
  1256.  
  1257. Warning (2) : Zero outputs.
  1258.  
  1259.               Zero outputs is possible because all outputs of the machine can
  1260.               come directly from flip-flop outputs. In these cases it is
  1261.               possible for the designer to enter zero as the number of outputs
  1262.               (using the 0 command line parameter).
  1263.  
  1264. Warning (3) : The number of transition conditions was changed
  1265.               from 'm' to 'n'.
  1266.  
  1267.               If the number that defined transition conditions was zero, and
  1268.               the user defined a number of inputs that is greater then zero,
  1269.               the software will generate a canonical number of transition
  1270.               conditions = (2)^(number_of_inputs). This can be a large number.
  1271.  
  1272.               Other cases when this warning is reported are when the maximum
  1273.               number of defined state transitions is higher than it is
  1274.               possible with the defined number of inputs. For example if the
  1275.               the user defined tow inputs and five conditions a warning
  1276.               will be reported. It will tell you that the maximum number of
  1277.               conditions was decreased, to four conditions (the maximum
  1278.               possible number of conditions when the machine has tow inputs).
  1279.  
  1280.  
  1281. Here is a list of Notes that the program can report:
  1282.  
  1283. Note (1) : Machine type is Moore.
  1284.  
  1285. Note (2) : Machine type is Mealy.
  1286.  
  1287. Note (3) : Number of un-used states is: 'n'.
  1288.  
  1289.            The program calculates the difference between the largest number
  1290.            off possible flip-flop combinations and the actual number of states
  1291.            that was defined. The designer has to pay attention to these
  1292.            Hang-Up states. The machine can enter a Hang-Up state during
  1293.            power-up or as a result of noise.
  1294.  
  1295.  page 32
  1296.  
  1297.                          Limitations & Legal details
  1298.                          ---------------------------
  1299.  
  1300. The software is written by and Copyrighted to - Amos Zaslavsky. ASTATER is a
  1301. shareware. This means that you are allowed to copy it freely, and give copies to
  1302. other users.
  1303.  
  1304.        You are encouraged to do so, but with the following limitations:
  1305.  
  1306. - You must distribute ASTATER.EXE and ASTATER.DOC together and unmodified.
  1307.  
  1308. - You may not charge more than a minimal distribution fee (maximum $5.00)
  1309.   for covering disk price & postage of a diskette containing the files.
  1310.  
  1311. - You may not distribute ASTATER with or as part of other commercially sold
  1312.   software without written permission of the author.
  1313.  
  1314. - You are not permitted to sell this program for profit in any way, shape or
  1315.   form.
  1316.  
  1317. - If you like this program and use it regularly, the author would appreciate a
  1318.   contribution of $25.00, sent to the address below.
  1319.  
  1320. - As with all shareware, these contributions are the incentives for the
  1321.   author to continue developing this utility and other utilities.
  1322.  
  1323. - Contributors suggestions for enhancements will be considered in future
  1324.   versions.
  1325.  
  1326. - The author would appreciate being informed of any bugs !
  1327.  
  1328. - Future enhancements may include improovments like ABEL Symbolic-state style,
  1329.   entering input & output names, an interactive version, and other HDL's like
  1330.   PALASM and CUPUL or even C.
  1331.  
  1332.  
  1333. My address is:
  1334.                            Amos Zaslavsky
  1335.                            28 Berel Katzenelson st.
  1336.                            Haifa
  1337.                            Israel 32768
  1338.  
  1339. Telephone (voice):
  1340.                            972-4-230219
  1341.  
  1342.  
  1343.  
  1344.                                   Thank you.
  1345.  
  1346.  
  1347.  
  1348.